Only remove domain from store once it's suspended.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 5 Sep 2005 14:45:19 +0000 (14:45 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 5 Sep 2005 14:45:19 +0000 (14:45 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/python/xen/xend/XendCheckpoint.py

index 81d34b8f459396d51126b84599fa8b35905f3722..39616bd0797424d9630779b6b51c9e6a4363f2a1 100644 (file)
@@ -70,6 +70,8 @@ def save(xd, fd, dominfo, live):
                 if l.rstrip() == "suspend":
                     log.info("suspending %d" % dominfo.id)
                     xd.domain_shutdown(dominfo.id, reason='suspend')
+                    dominfo.state_wait("suspended")
+                    log.info("suspend %d done" % dominfo.id)
                     if dominfo.store_channel:
                         try:
                             dominfo.db.releaseDomain(dominfo.id)
@@ -78,8 +80,6 @@ def save(xd, fd, dominfo, live):
                                 "error in domain release on xenstore: %s",
                                 ex)
                             pass
-                    dominfo.state_wait("suspended")
-                    log.info("suspend %d done" % dominfo.id)
                     child.tochild.write("done\n")
                     child.tochild.flush()
         if filter(lambda (fd, event): event & select.POLLHUP, r):